package com.itheima.service.impl;

import com.itheima.dao.BookDao;

import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {


//    注入数字
    private int num;
//    注入字母
    private String version;

//    第三步，注入BookDao对象
    private BookDao bookDao;

//    第3.1步，写一个无参构造
    public UserServiceImpl(){

    }

    public void setVersion(String version) {
        this.version = version;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void save() {
        System.out.println("user service is running..." + num + " " + version);
//        第四步，调用BookDao接口中的方法。
        bookDao.save();
    }
}
